"""
@File    :   enums.py
@Time    :   2024/03/07 22:13:31
@Author  :   Qrj
@Email   :   923207736@qq.com
@description   :   Oauth2授权认证相关枚举类
"""

from enum import Enum, unique


@unique
class OAuth2GrantTypeEnum(Enum):
    """OAuth2的授权方式类型枚举类"""

    authorization_code = "authorization_code"  # 授权码模式
    implicit = "implicit"  # 简化模式(隐藏模式)
    password = "password"  # 密码模式
    swagger_password = "swagger_password"  # swagger专用的密码模式
    client_credentials = "client_credentials"  # 客户端凭证模式


@unique
class UserLoginPasswordEncryptTypeEnum(Enum):
    """用户登录时使用的密码加密类型枚举类"""

    rsa = "rsa"
    sm2 = "sm2"
